//package com.lzx.adx.report.config;
//
//import com.aliyun.openservices.aliyun.log.producer.LogProducer;
//import com.aliyun.openservices.aliyun.log.producer.Producer;
//import com.aliyun.openservices.aliyun.log.producer.ProducerConfig;
//import com.aliyun.openservices.aliyun.log.producer.ProjectConfig;
//import lombok.Data;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//@Data
//public class LogProducerSlsConfig {
//
//    @Value("${aliyun.sls.endpoint}")
//    private String endpoint;
//
//    @Value("${aliyun.sls.accessKeyId}")
//    private String accessKeyId;
//
//    @Value("${aliyun.sls.accessKeySecret}")
//    private String accessKeySecret;
//
//    @Value("${aliyun.sls.project}")
//    private String project;
//
//    @Value("${aliyun.sls.logstore1}")
//    private String logstore;
//
//    @Value("${aliyun.sls.logstore2}")
//    private String logstore2;
//
//    @Bean
//    public Producer slsProducer() {
//        ProjectConfig projectConfig = new ProjectConfig(project, endpoint, accessKeyId, accessKeySecret);
//        ProducerConfig producerConfig = new ProducerConfig();
//        producerConfig.setBatchSizeThresholdInBytes(3 * 1024 * 1024);
//        producerConfig.setBatchCountThreshold(40960);
//        Producer producer = new LogProducer(producerConfig);
//        producer.putProjectConfig(projectConfig);
//
//        return producer;
//    }
//}